package com.wqz.day19_redisdemo.controller;

import com.wqz.day19_redisdemo.entity.Blog;
import com.wqz.day19_redisdemo.service.BlogService;
import com.wqz.day19_redisdemo.vo.R;
import org.springframework.web.bind.annotation.*;
import jakarta.annotation.Resource;

/**
 * (Blog)表控制层
 *
 * @author 王乾州
 * @since 2025-10-20 18:47:27
 */
@RestController
@RequestMapping("blogs")
public class BlogController {
    /**
     * 服务对象
     */
    @Resource
    private BlogService blogService;


    @GetMapping("/{id}")
    public R selectBlogById(@PathVariable("id") Long id) {
        return blogService.selectBlogById(id);
    }


}

